import { defineConfig, presetUno, presetAttributify, presetIcons } from 'unocss'

export default defineConfig({
  presets: [
    presetUno(),
    presetAttributify(),
    presetIcons({
      collections: {
        // 可以添加图标集合
      }
    })
  ],
  theme: {
    colors: {
      primary: '#60a5fa',
      secondary: '#3b82f6',
      success: '#52c41a',
      warning: '#faad14',
      error: '#f5222d',
      info: '#60a5fa',
      white: '#ffffff',
      black: '#000000',
      transparent: 'transparent',
      // 蓝紫色主题色系
      'blue-purple': {
        50: '#f0f4ff',
        100: '#e0e7ff',
        200: '#c7d2fe',
        300: '#a5b4fc',
        400: '#818cf8',
        500: '#6366f1',
        600: '#4f46e5',
        700: '#4338ca',
        800: '#3730a3',
        900: '#312e81'
      },
      blue: {
        300: '#93c5fd',
        400: '#60a5fa',
        500: '#3b82f6'
      },
      indigo: {
        300: '#a5b4fc',
        400: '#818cf8',
        500: '#6366f1',
        600: '#4f46e5'
      },
      violet: {
        200: '#ddd6fe',
        300: '#c4b5fd',
        400: '#a78bfa',
        500: '#8b5cf6'
      },
      purple: {
        300: '#d8b4fe',
        400: '#c084fc',
        500: '#a855f7',
        600: '#9333ea'
      }
    },
    animation: {
      aurora: 'aurora 60s linear infinite'
    },
    keyframes: {
      aurora: {
        from: {
          backgroundPosition: '50% 50%, 50% 50%'
        },
        to: {
          backgroundPosition: '350% 50%, 350% 50%'
        }
      }
    }
  },
  shortcuts: {
    'btn': 'px-4 py-2 rounded inline-block bg-primary text-white cursor-pointer hover:bg-primary/80 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50',
    'btn-secondary': 'px-4 py-2 rounded inline-block bg-secondary text-white cursor-pointer hover:bg-secondary/80',
    'input': 'px-3 py-2 border border-gray-300 rounded focus:outline-none focus:border-primary',
    'card': 'bg-white rounded-lg shadow-md p-6'
  }
})